/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.UnsupportedEncodingException;

/**
 * <p>Project: javaseapp - Str1
 * <p>Powered by webrx On 2021-08-06 10:36:52
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class Str8 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        //java 11 String 新的API 方法
        String str = " ";
        System.out.println(str.isBlank());//true  true
        System.out.println(str.isEmpty());//true  false

        System.out.println("      java16     ".trim());
        System.out.println("      java16     ".strip());
        System.out.println("      java16     ".stripTrailing());
        System.out.println("      java16     ".stripLeading());
        System.out.println("java16".repeat(3));
        //Stream<String>
        System.out.println("\r\naaa\r\nbbbbb\r\ndddd".lines().count()); //行数


    }
}
